import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import type { App } from "vue";

import { useUserInfo } from "./modules/userInfo";

export const store = createPinia();
export const setupPinia = (app: App<Element>) => {
  store.use(piniaPluginPersistedstate);
  app.use(store);
  return store;
};

export {
  useUserInfo
}
